package com.example.democrud.interceptor;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.servlet.HandlerMapping;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import sun.rmi.runtime.NewThreadAction;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
import java.util.Objects;

/**
 * @ClassName PathInterceptor
 * @Author Administrator
 * @Date 2020/4/24   10:13
 */

public class PathInterceptor extends HandlerInterceptorAdapter {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//        Map pathValues = (Map) request.getAttribute(HandlerMapping.LOOKUP_PATH);
//        if(!Objects.equals(pathValues.get("employeeId"),null)){
//
//        }

        return super.preHandle(request, response, handler);
    }
}
